package com.qnnu.studenttravelsystem.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.qnnu.studenttravelsystem.entity.Counselor;
import com.qnnu.studenttravelsystem.mapper.CounselorMapper;
import com.qnnu.studenttravelsystem.service.ICounselorService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zhongge
 * @since 2025-11-20
 */
@Service
public class CounselorServiceImpl extends ServiceImpl<CounselorMapper, Counselor> implements ICounselorService {
    @Autowired
    private CounselorMapper counselorMapper;

    @Override
    public Counselor selectByStaffNo(String staffNo) {
        //获取查询条件
        QueryWrapper<Counselor> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("staff_no",staffNo);
        return counselorMapper.selectOne(queryWrapper);
    }
}
